import request from '../utils/request';

const studentApi={
    selectAll() {
        return request({
            url: '/stu/list.do',
            method: 'get'
        })
    },
    //分页查询
    selectByPage(params) {   //params对象封装分页参数
        return request({
            url: '/stu/selectByPage.do',
            method: 'get',
            params:params
        })
    },
    // 条件查询带分页
    selectByCondition(page,pageSize,params){
        console.log("数据")
        console.log(params)
        return request({
            url:'/stu/selectByCondition.do',
            method:'post',
            params:{
                currentPage:page,
                pageSize:pageSize
            },
            data:params
        })
    },
    addStudent(params){
        return request({
            url:'/stu/addStudent.do',
            method:'post',
            data:params
        })
    },
}


export default studentApi











